﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Example04.aspx.cs" Inherits="Chapter20.Example04" %>

<!DOCTYPE html>

<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>代码清单 20-4 为元素设置尺寸</title>
    <meta name="author" content="Adam Freeman" />
    <meta name="description" content="A simple example" />
    <link rel="shortcut ico" href="images/favicon.ico" type="image/x-ico" />
    <style type="text/css">
        div {
            width: 75%;
            height: 100px;
            border: thin solid black;
        }

        img {
            background: lightgray;
            border: 4px solid black;
            margin: 2px;
            height: 50%;
        }

        #first {
            box-sizing: border-box;
            width: 50%;
        }

        #second {
            box-sizing: content-box;
        }
    </style>
</head>
<body>
    <div>
        <img id="first" src="images/banana.png" alt="small banana" />
        <img id="second" src="images/banana.png" alt="small banana" />
    </div>
</body>
</html>
